<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>De Stijl: /Users/Piro/Dropbox/destijl/c/headers/dserver.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">De Stijl
   
   </div>
   <div id="projectbrief">Librairie pour le projet De Stijl</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('dserver_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">/Users/Piro/Dropbox/destijl/c/headers/dserver.h</div>  </div>
</div>
<div class="contents">
<a href="dserver_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef SERVER_H</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define SERVER_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;<a class="code" href="dmessage_8h.html" title="Déclaration de la classe DMessage.">./dmessage.h</a>&quot;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;<a class="code" href="dconstantes_8h.html" title="Déclaration des constantes du projet.">./dconstantes.h</a>&quot;</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00020"></a>00020 <span class="preprocessor">#endif</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00028"></a><a class="code" href="struct_d_server.html">00028</a>     <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> {
<a name="l00029"></a><a class="code" href="struct_d_server.html#ada6651450c5eca42eda3068b0731f0e6">00029</a>         void(*<a class="code" href="struct_d_server.html#ada6651450c5eca42eda3068b0731f0e6">free</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This); 
<a name="l00030"></a><a class="code" href="struct_d_server.html#afc5b0ea9afb72d291f601dc5e6760e60">00030</a>         void(*<a class="code" href="struct_d_server.html#afc5b0ea9afb72d291f601dc5e6760e60">print</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This); 
<a name="l00031"></a><a class="code" href="struct_d_server.html#a8a51bd2f6109c4b0bb6c21636f3b617e">00031</a>         int(*<a class="code" href="struct_d_server.html#a8a51bd2f6109c4b0bb6c21636f3b617e">open</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This, <span class="keywordtype">char</span> * port); 
<a name="l00032"></a><a class="code" href="struct_d_server.html#aaccc2f3a38dd8b947ae5886d3fa3d338">00032</a>         void(*<a class="code" href="struct_d_server.html#aaccc2f3a38dd8b947ae5886d3fa3d338">close</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This); 
<a name="l00033"></a><a class="code" href="struct_d_server.html#aaf1e8495273487cd100790576c4966b2">00033</a>         int(*<a class="code" href="struct_d_server.html#aaf1e8495273487cd100790576c4966b2">send</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This, <a class="code" href="struct_d_message.html" title="DMessage est un objet permettant de mettre en forme les messages à envoyer vers le superviseur...">DMessage</a> *message); 
<a name="l00034"></a><a class="code" href="struct_d_server.html#a7fc1e1c04212178d87f622fb345c41d0">00034</a>         int(*<a class="code" href="struct_d_server.html#a7fc1e1c04212178d87f622fb345c41d0">receive</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This, <a class="code" href="struct_d_message.html" title="DMessage est un objet permettant de mettre en forme les messages à envoyer vers le superviseur...">DMessage</a> *message); 
<a name="l00035"></a><a class="code" href="struct_d_server.html#a0b54fee131ab76a068008553f13513a2">00035</a>         int(*<a class="code" href="struct_d_server.html#a0b54fee131ab76a068008553f13513a2">is_active</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This); 
<a name="l00036"></a><a class="code" href="struct_d_server.html#ac50a20bd04e31b7b00c7f7c744a0c67b">00036</a>         <span class="keywordtype">int</span> <a class="code" href="struct_d_server.html#ac50a20bd04e31b7b00c7f7c744a0c67b">socketID</a>; 
<a name="l00037"></a><a class="code" href="struct_d_server.html#aa5805c5e936174e5092bf7a5b78e7e64">00037</a>         <span class="keywordtype">int</span> <a class="code" href="struct_d_server.html#aa5805c5e936174e5092bf7a5b78e7e64">active</a>; 
<a name="l00038"></a>00038     } <a class="code" href="dserver_8h.html#a4ee01a5b47192e700e45f6318893de04">DServer</a>;
<a name="l00039"></a>00039 
<a name="l00045"></a>00045     <a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a>* <a class="code" href="dserver_8h.html#a09ec71e6c51c1826c806c0cf57a61e90" title="Instanciation de l&#39;objet DServer.">d_new_server</a>(<span class="keywordtype">void</span>);
<a name="l00046"></a>00046 
<a name="l00052"></a>00052     <span class="keywordtype">void</span> <a class="code" href="dserver_8h.html#a8ee76d250bfcc1f3e222e03001a48a88" title="Fonction pour désallouer un instance de l&#39;objet DServer.">d_server_free</a>(<a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This);
<a name="l00053"></a>00053 
<a name="l00059"></a>00059     <span class="keywordtype">void</span> <a class="code" href="dserver_8h.html#a60b95acae6acc285a9cd8e0cced1298e" title="Affichage d&#39;une instance d&#39;objet DServer.">d_server_print</a>(<a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This);
<a name="l00060"></a>00060 
<a name="l00068"></a>00068     <span class="keywordtype">int</span> <a class="code" href="dserver_8h.html#a4d7b09ae2294b24be44ba96515c81cce" title="Ouverture du serveur.">d_server_open</a>(<a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This, <span class="keywordtype">char</span> * port);
<a name="l00069"></a>00069     
<a name="l00075"></a>00075     <span class="keywordtype">void</span> <a class="code" href="dserver_8h.html#a2a60e224c9db382cffde379e1fe71bcb" title="Fermeture du serveur.">d_server_close</a>(<a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This);
<a name="l00076"></a>00076 
<a name="l00085"></a>00085     <span class="keywordtype">int</span> <a class="code" href="dserver_8h.html#a7da3b11924e291d6ee7047c4835d9756" title="Envoi d&#39;un message.">d_server_send</a>(<a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This, <a class="code" href="struct_d_message.html" title="DMessage est un objet permettant de mettre en forme les messages à envoyer vers le superviseur...">DMessage</a> *msg);
<a name="l00086"></a>00086     
<a name="l00087"></a>00087     
<a name="l00095"></a>00095     <span class="keywordtype">int</span> <a class="code" href="dserver_8h.html#ac7aa91dba4f89839d3961a743f769846" title="Attente bloquante d&#39;un message.">d_server_receive</a>(<a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This, <a class="code" href="struct_d_message.html" title="DMessage est un objet permettant de mettre en forme les messages à envoyer vers le superviseur...">DMessage</a> *msg);
<a name="l00096"></a>00096     
<a name="l00097"></a>00097     
<a name="l00104"></a>00104     <span class="keywordtype">int</span> <a class="code" href="dserver_8h.html#a4d798d54bb5188291890fd8ac78f57c5" title="Retourne l&#39;état du serveur.">d_server_is_active</a>(<a class="code" href="struct_d_server.html" title="DServer est un objet contenant la description d&#39;un serveur de messages.">DServer</a> *This);
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span>}
<a name="l00108"></a>00108 <span class="preprocessor">#endif</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span>
<a name="l00110"></a>00110 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dserver_8h.html">dserver.h</a>      </li>

    <li class="footer">Generated on Tue Apr 24 2012 14:13:31 for De Stijl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6 </li>
   </ul>
 </div>


</body>
</html>
